    <?php $this->load->view('wedding/wedding_head');?>
    <script type='text/javascript'>
    //表单的前台校验
    function check_corp_name(){
		var corp_name = $('#i_name').val();
		if ( corp_name.length > 30 || corp_name.length < 6 ) {
			//长度不符
			$('#corp_name').attr('class','error');
			$('#corp_name').html('公司名称应在6-30个字符');
			} else {
			//ok
			$('#corp_name').attr('class','moreInfo');
			$('#corp_name').html('');	
			}

        }
    function check_corp_detail(){
		var corp_detail = $('#corp_detail').html();
		if ( corp_detail.length > 2000 || corp_detail.length < 1 ) {
			//长度不符
			$('#detail_error').attr('class','error');
			$('#detail_error').html('公司简介应该在2000字以内,必须填写');
			} else {
			//ok
			$('#detail_error').attr('class','moreInfo');
			$('#detail_error').html('');	
			}

        }
    function check_corp_logo(){
		var corp_logo = $('#corp_logo').val();
		if (corp_logo.length < 3 ) {
			//长度不符
			$('#logo_error').attr('class','error');
			$('#logo_error').html('请选择Logo图片');
			} else {
			//ok
			$('#logo_error').attr('class','moreInfo');
			$('#logo_error').html('');	
			}

        }
    function checkall(){
		check_corp_name();
		check_corp_detail();
		check_corp_logo();
		var corp_name = $('#corp_name').html();
		var corp_detail = $('#detail_error').html();
		var corp_logo = $('#logo_error').html();
		if (corp_name.length > 3 || corp_detail.length > 3 || corp_logo.length > 3 ){return false;}else {return true;}

        }
    
    </script>
    <input type="hidden" id="page_code" value="2"/>
    <!-- begin: main content area #main -->
     <div id="main">
      <!-- begin: #col1 - first float column -->
      <div id="col1" role="complementary">
        <?php $this->load->view('wedding/wedding_left_nav.php')?>
      </div>
      <!-- end: #col1 -->
      <!-- begin: #col3 static column -->
      <div id="col3" role="main">
        <div id="col3_content" class="clearfix">
           
           <div class="my_box">
            <p class="box_title"><span>婚庆公司基本信息管理</span></p>
          	<form onsubmit='return checkall()' enctype='multipart/form-data' action="<?php echo base_url();?>index.php/wedding/WeddingManagerAction/info" method="post">
          		<input type="hidden" id="hidden_action" name="action"/>
	            <div style="color:red;margin:20px;"></div>  	
	          	<ul class="userInfo" style="margin-top:20px">
	          		<li class='error'><?php echo validation_errors(); ?></li>
	          		<?php if (isset ($upload_error)){echo $upload_error;}?>
	          		<li>
	          			<span class="label">*公司名称:</span>
		         		<input type="text" onblur='check_corp_name()' id='i_name' name="i_name" size="10" value="<?php echo set_value('i_name'); ?>"/> 
		         		<span id='corp_name' class="moreInfo">公司名称必须 、最多输入30个字符</span>		
	         		</li>
	          		
	          		<li>
	          			<span class="label">公司LOGO:</span>
		         		<input onblur='check_corp_logo()' id='corp_logo' type="file" name="logo_img"/> 
		         		<span style="margin-left:30px;" id='logo_error' class="moreInfo">文件上限150kb 类型JPG GIF PNG</span>		
	         		</li>
	          		
	          		<li>
	          			<span class="label">*公司简介:</span><span  id='detail_error' class="moreInfo">公司简介必须填写 2000字以内</span>
						<textarea name='corp_detail' id='corp_detail' onblur='check_corp_detail()' style="overflow:hidden;display: block;" rows="10" cols="60"><?php echo set_value('corp_detail'); ?></textarea>
	         		</li>
	         		
	          		<li><input type='submit' value='提交'></li>
	          	</ul>
	          
          	</form>
          </div>
        </div>
        <div id="ie_clearing">&nbsp;</div>
        <!-- End: IE Column Clearing -->
      </div>
      <!-- end: #col3 -->
    </div>
   
    <!-- end: #main -->
<?php $this->load->view('user/footer');?>